#ifndef _MESSAGE_H_
#define _MESSAGE_H_

#include <string>

namespace staff
{
  class CDataObject;
}

namespace smq
{
  //! server-side message struct header
  struct MessageHeader
  {
    std::string sId;        //!< id
    std::string sQueue;     //!< queue
    std::string sPublisher; //!< publisher
  };

  //! server-side message struct
  struct Message: public MessageHeader
  {
    std::string sText;      //!< message
  };

  staff::CDataObject& operator<<(staff::CDataObject& rdoParam, const MessageHeader& rstStruct);
  const staff::CDataObject& operator>>(const staff::CDataObject& rdoParam, MessageHeader& rstStruct);

  staff::CDataObject& operator<<(staff::CDataObject& rdoParam, const Message& rstStruct);
  const staff::CDataObject& operator>>(const staff::CDataObject& rdoParam, Message& rstStruct);
}

#endif // _MESSAGE_H_
